using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities;

namespace JobToDdd.Domain.JobInfo
{
    public class Job : Entity<int>
    {
        public string JobName { get; set; }
        public string JobPay { get; set; }
        public string Welfare { get; set; }
        public string Education { get; set; }
        public string WorkExperience { get; set; }
        public int? CityId { get; set; }
        public string WorkArea { get; set; }
        public DateTime? PublishTime { get; set; }
        public string PositionInfo { get; set; }
        public int? CompanyId { get; set; }

        public virtual Company Company { get; set; }
        public virtual City City { get; set; }

        public Job GetJob(Job job, City city, Company company)
        {
            if (job == null)
            {
                throw new Exception("job不可为空");
            }
            job.City = city;
            job.Company = company;
            return job;
        }

    }
}
